CC = gcc
LD = gcc
#CFLAGS = -g -Wall -std=c99 -fPIC
CFLAGS = -O3 -Wall -std=c99 -fPIC -DNDEBUG
LDFLAGS = -levent_core -levent_pthreads

all: libevent_helper.so

libevent_helper.so: helper.o session.o acceptor.o
	$(LD) -shared $^ $(LDFLAGS) -o $@

helper.o: helper.c event2/helper.h
session.o: session.c event2/session.h event2/helper.h
acceptor.o: acceptor.c event2/acceptor.h event2/session.h event2/helper.h

clean:
	$(RM) *.o
	$(RM) libevent_helper.so

.PHONY: all clean
